class ResponseCloth {
  String msg;
  List<ClothTypeModel> data;

  ResponseCloth({this.msg, this.data});

  ResponseCloth.fromJson(Map<String, dynamic> json) {
    msg = json['msg'];
    if (json['data'] != null) {
      data = new List<ClothTypeModel>();
      json['data'].forEach((v) {
        data.add(new ClothTypeModel.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['msg'] = this.msg;
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class ClothTypeModel {
  String type;
  String name;
  List<ClothModel> data;

  ClothTypeModel({this.type, this.name, this.data});

  ClothTypeModel.fromJson(Map<String, dynamic> json) {
    type = json['type'];
    name = json['name'];
    if (json['data'] != null) {
      data = new List<ClothModel>();
      json['data'].forEach((v) {
        data.add(new ClothModel.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['type'] = this.type;
    data['name'] = this.name;
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class ClothModel {
  int id;
  String name;
  int price;
  String mainimage;

  ClothModel({this.id, this.name, this.price, this.mainimage});

  ClothModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    price = json['price'];
    mainimage = json['mainimage'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['price'] = this.price;
    data['mainimage'] = this.mainimage;
    return data;
  }
}